//---------------------------------------------------------------------------

#ifndef TBoosterH
#define TBoosterH

#include "TRetarder.h"

//---------------------------------------------------------------------------
class TBooster : public TRetarder
{
public:
	float ioBeginPosition, ioEndPosiotion;
   bool __fastcall Initialize(const TMeasurementRate MeasurementRate);
   __fastcall TBooster();
	float __fastcall Woks(const unsigned short CutTrackNumber, const int CutNumber,
								 const float CutSpeed,
								 const float Begin, const float End,
								 const float NowTime, const TAxesType AxesType);
   void __fastcall ChangeCtrState(const bool Value);
   __property bool IsControlled  = { read=FIsControlled, write=SetControlled };
   __property int CtrNumber  = { read=FCtrNumber, write=FCtrNumber };
   TBooster & __fastcall operator = (const TBooster & t);
	TBooster & __fastcall operator = (const AnsiString ModeName);
   void __fastcall ChangeCtrState(void);
	void __fastcall Load(const int Handle);
	void __fastcall Save(const int Handle);
	double BaseWork;
	int WorkIndex;
private:
	bool FIsControlled;
	bool FCtrState;
	int FCtrNumber;
	float __fastcall Work(const float CutSpeed);
   void __fastcall SetControlled(const bool Value);
};


class TBoosters: public vector<TBooster>
{
public:
   __fastcall TBoosters();
	bool __fastcall Initialize(const TMeasurementRate MeasurementRate);
   TBoosters & __fastcall operator = (const TBoosters & t);
   void __fastcall Add(const AnsiString ModelName,
                       const float Begin, const float End,
                       const unsigned short Quanitity,
                       const unsigned short MinTrack, const unsigned short MaxTrack,
                       const int CtrNumber = -1);
	float __fastcall Works(const unsigned short CutTrackNumber, const int CutNumber,
								  const float CutSpeed,
								  const float Begin, const float End,
								  const float NowTime, const TAxesType AxesType);
   void __fastcall Load(const int Handle);
   void __fastcall Save(const int Handle);
};

class TBoosterList : public vector<TBooster>
{
public:
	__fastcall TBoosterList();
	bool __fastcall Initialize(void);
	void __fastcall New(const AnsiString ModelName, const unsigned short Index,
							  const float BaseWork);
	unsigned short __fastcall Index(const AnsiString ModelName);
	AnsiString __fastcall Model(const unsigned short ModelIndex);
	TBooster __fastcall Which(const unsigned short ModelIndex);
	TBooster __fastcall Which(const AnsiString ModelName);
private:
};

#endif
